﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Restaurant.DTO;
using Restaurant.DAO;
using System.Data;



namespace Restaurant.BUS
{
    public class ChiTietKhoService
    {
        private ChiTietKhoBD httDAO = new ChiTietKhoBD();

        public DataTable LayChiTietKho(int maKho)
        {
            return httDAO.LayChiTietKho(maKho);
        }

        public DataTable LayChiTietKhoNL(int maKho, int maNL)
        {
            return httDAO.LayChiTietKhoNL(maKho,maNL);
        }

        public DataTable LayNguyenLieuCTKhoNCC(int maKho, int maNCC)
        {
            return httDAO.LayNguyenLieuCTKhoNCC(maKho, maNCC);
        }

        public DataTable LayNguyenLieuCTKhoLoaiNL(int maKho, int maLoaiNL)
        {
            return httDAO.LayNguyenLieuCTKhoLoaiNL(maKho, maLoaiNL);
        }

        public bool ThemChiTietKho(int maKho, int maNL, float toiDa, float toiThieu, float Ton, int TTrang)
        {
            if (httDAO.ThemChiTietKho(maKho,maNL,toiDa,toiThieu,Ton,TTrang))
                return true;
            return false;
        }

        public bool XoaChiTietKho(int maKho,int maNL)
        {
            if (httDAO.XoaChiTietKho(maKho, maNL))
                return true;
            return false;
        }

        public bool SuaChiTietKho(int maKho, int maNL, float toiDa, float toiThieu, float Ton, int TTrang)
        {
            if (httDAO.SuaChiTietKho(maKho, maNL, toiDa, toiThieu, Ton, TTrang))
                return true;
            return false;
        }

        public bool SuaChiTietKhoErro(int maKho, int maNL, float toiDa, float toiThieu, float Ton, int TTrang)
        {
            if (httDAO.SuaChiTietKhoErro(maKho, maNL, toiDa, toiThieu, Ton, TTrang))
                return true;
            return false;
        }

        public bool SuaChiTietKhoFix(int maKho, int maNL, float toiDa, float toiThieu, float Ton, int TTrang)
        {
            if (httDAO.SuaChiTietKhoFix(maKho, maNL, toiDa, toiThieu, Ton, TTrang))
                return true;
            return false;
        }

        
    }
}
